class NameError(Exception):
    def __str__(self):
        return "异常描述信息"

class LenError(Exception):
    def __str__(self):
        return "长度不符合要求"


username = input("请输入用户名:")

try:
    if len(username)>=8 and len(username)<= 16:
        print("用户名可以使用")
    else:
        raise LenError()

except LenError as a:
    print(a)
print(1111)